package com.ideyatech.allowancereceipts.evolve;

import com.ideyatech.allowancereceipts.entity.Establishment;
import com.ideyatech.allowancereceipts.service.EstablishmentService;


public class DBEvolve001 implements org.opentides.persistence.evolve.DBEvolve {
	
	private EstablishmentService establishmentService;

	public void execute() {
		Establishment est1 = new Establishment();
		est1.setName("Rufo's");
		est1.setAddress("Pearl Drive, Pasig City");
		est1.setTaxIDNumber("000-000-000-001");
		est1.setMunicipality("Pasig City");
		establishmentService.save(est1 );
		
		Establishment est2 = new Establishment();
		est2.setName("Yellow Cab");
		est2.setAddress("Pearl Drive, Pasig City");
		est2.setTaxIDNumber("000-000-000-002");
		est2.setMunicipality("Pasig City");
		establishmentService.save(est2 );
	}

	public String getDescription() {
		return "Added Establishments for Testing";
	}

	public int getVersion() {
		return 1;
	}

	public void setEstablishmentService(EstablishmentService establishmentService) {
		this.establishmentService = establishmentService;
	}

}
